﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace Crank.Core
{
    public interface IScripter
    {
        void Script(DataModel model, TextWriter output);
    }

    public static class ScripterDataModelExtensions
    {
        public static void ScriptWith<T>(this DataModel model, TextWriter output) where T : IScripter, new()
        {
            T scripter = new T();
            scripter.Script(model, output);
        }
    }
}
